const {
	defineConfig
} = require('@vue/cli-service')
module.exports = defineConfig({
	transpileDependencies: true,
	lintOnSave: false,
	publicPath: './',

	configureWebpack: config => {
		// 为生产环境修改配置...
		if (process.env.NODE_ENV === 'production') {
			config.mode = 'production';
			// 打包文件大小配置
			config.performance = {
				maxEntrypointSize: 10000000,
				maxAssetSize: 30000000
			}
		}
	},

	chainWebpack: config => {

		config.set('externals', {
			vue: 'Vue',
			'vue-router': 'VueRouter',
			axios: 'axios',
			lodash: '_',
			echarts: 'echarts',
			nprogress: 'NProgress',
			'vue-quill-editor': 'VueQuillEditor'
		})
	}
})
